Skip to content

Conversation

@goosewobbler
Copy link
Contributor

@goosewobbler goosewobbler commented Oct 22, 2025

Closes #14

TODO:

  • Fix windows artifact issue
  • Update to Tauri v2
  • Fix API missing
  • Fix core E2Es
  • Mocking investigation
  • Fix Linux multiremote data directory issue breaking run before test execution

@goosewobbler goosewobbler changed the title feat: extract native-utils feat: tauri service Oct 24, 2025
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from 8bf7bfe to 3d60d8d Compare October 25, 2025 09:08
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from ab5b95d to cf2b28d Compare October 28, 2025 16:06
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch 8 times, most recently from af97888 to 4ca7cad Compare October 28, 2025 23:33
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from 4ca7cad to 90798e8 Compare October 29, 2025 01:26
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from 49660f5 to 6b5baa7 Compare October 29, 2025 03:22
- Add debug logging to write_file Rust command to see received parameters
- Add debug logging to JavaScript execute function to see sent parameters
- Fix test to pass all required parameters (including null for optional)
- This will help identify if the issue is in parameter serialization/deserialization
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from fd3a59a to 1e45eb7 Compare October 29, 2025 13:12
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from 1e45eb7 to 157ff55 Compare October 29, 2025 13:13
- Add utility functions to extract instance ID from capabilities args
- Generate unique data directories per multiremote instance (browserA, browserB, etc.)
- Set XDG_DATA_HOME (Linux) or TAURI_DATA_DIR (Windows) environment variables
- Remove manual environment variable configuration from WDIO config
- Service automatically handles isolation without user configuration

This should resolve SQLite database locking issues on Linux when running
multiple Tauri webview instances in multiremote mode.
@goosewobbler goosewobbler force-pushed the feat/extract-native-utils branch from e67c4b0 to fdae90d Compare October 29, 2025 14:34
- Fix onWorkerStart to properly handle multiremote capabilities object structure
- Multiremote caps are { browserA: { capabilities: {...} }, browserB: { capabilities: {...} } }
- Extract first instance capabilities and detect instance ID correctly
- This should now properly trigger data directory isolation for multiremote instances

The previous logic was trying to access tauri:options directly on the multiremote
object instead of drilling down to the individual instance capabilities.
…nheritance

- Move setupDataDirectoryIsolation() call to onPrepare() before startTauriDriver()
- This ensures tauri-driver inherits XDG_DATA_HOME/TAURI_DATA_DIR environment variables
- Previously, isolation was set in onWorkerStart() after tauri-driver was already spawned
- Now tauri-driver gets the correct environment variables from the start
- This should resolve the SQLite database locking issues on Linux

The key insight: tauri-driver is spawned in onPrepare, so environment variables
must be set before that point, not in onWorkerStart.
…nces

- Add support for spawning separate tauri-driver processes per multiremote instance
- Each instance gets its own tauri-driver with instance-specific environment variables
- Use different ports for each instance (4444 + instance number)
- Track multiple processes in tauriDriverProcesses Map
- Update stopTauriDriver to clean up all instance-specific processes

This should resolve the SQLite database locking issue by ensuring each
multiremote instance has its own isolated tauri-driver process with
separate XDG_DATA_HOME directories.
@goosewobbler goosewobbler merged commit ddd3997 into main Oct 29, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tauri Service - Infrastructure and Core

2 participants